<?PHP
include("../config/connect.php");
include("../public/common.php");
$itemid = CheckUrlParamNoDie("itemid");
if ($itemid != "")
{
	$sql = "select id from goods_items where num_iid='$itemid' limit 1";
	$result = mysql_query( $sql );
	if (mysql_num_rows($result) > 0)
	{
		 $row = mysql_fetch_assoc( $result );
		echo "{\"code\":1,\"id\":\"".$row["id"]."\"}";
	}
	else
		echo "{\"code\":0}";
		
	exit;
}
		
echo "{\"code\":-1}";
exit;
?>